package com.jackchan.homework.sysw.entity;

import com.jackchan.homework.common.IdEntity;

import javax.persistence.*;

/**
 * Created by ch-hui on 15/12/26.
 * 配方单明细
 */
@Entity
@Table(name = "t_recipe_more")
public class RecipeMore extends IdEntity {

    private Recipe recipe;

    private Material material;

    private Float materialWeight;

    private Float materialPct;

    @ManyToOne
    @JoinColumn(name = "recipe_id", referencedColumnName = "id")
    public Recipe getRecipe() {
        return recipe;
    }

    public void setRecipe(Recipe recipe) {
        this.recipe = recipe;
    }

    @ManyToOne
    @JoinColumn(name = "material_id", referencedColumnName = "id")
    public Material getMaterial() {
        return material;
    }

    public void setMaterial(Material material) {
        this.material = material;
    }

    @Column(name = "material_weight")
    public Float getMaterialWeight() {
        return materialWeight;
    }

    public void setMaterialWeight(Float materialWeight) {
        this.materialWeight = materialWeight;
    }

    @Column(name = "material_pct")
    public Float getMaterialPct() {
        return materialPct;
    }

    public void setMaterialPct(Float materialPct) {
        this.materialPct = materialPct;
    }
}
